cmake_minimum_required(VERSION 3.28)
project(rpcServer)

set(CMAKE_CXX_STANDARD 20)

find_package(Threads REQUIRED)
find_package(Protobuf CONFIG REQUIRED)
find_package(gRPC CONFIG REQUIRED)
find_package(Poco REQUIRED COMPONENTS NetSSL)

aux_source_directory(./src src_file)
aux_source_directory(./rpc_src rpc_src_file)

include_directories(./include)
include_directories(./rpc_src)


add_executable(rpcServer main.cpp ${src_file} ${rpc_src_file})

target_link_libraries(rpcServer hiredis)
target_link_libraries(rpcServer gRPC::grpc++ protobuf::libprotobuf gRPC::grpc++_reflection )
target_link_libraries(rpcServer mysqlcppconn)
target_link_libraries(rpcServer Poco::NetSSL)

